import api from "../http";

export const getChatList = (role_id: number) => {
  return api.get("/api/chats/list?role_id=" + role_id);
};

export const addChat = (params: any) => {
  return api.post("/api/chats/add", params);
};

export const updateChat = (params: any) => {
  return api.post("/api/chats/update", params);
};

export const deleteChat = (params: any) => {
  return api.post("/api/chats/delete", params);
};

export const deleteAllChat = (params: any) => {
  return api.post("/api/chats/deleteAll", params);
};

export const addContent = (params: any) => {
  return api.post("/api/chats/content/add", params);
};

export const listOfContent = (chat_record_id: number) => {
  return api.get("/api/chats/content/list?chat_record_id=" + chat_record_id);
};
